package net.huashitong.buildedProject.web;

import com.sirdc.modules.core.web.JsonBaseController;
import com.sirdc.modules.core.web.model.Message;
import net.huashitong.buildedProject.dataBean.ProjectProgressDataBean;
import net.huashitong.buildedProject.filter.ProjectProgressFilter;
import net.huashitong.buildedProject.service.ProjectProgressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/web/projectProgress")
public class ProjectProgressController extends JsonBaseController {
    @Override
    protected String getView(String s) {
        return null;
    }

    @Autowired
    private ProjectProgressService progressService;

    /**
     * 查询进度
     * @return
     */
    @ResponseBody
    @RequestMapping(value = "/queryDataBean", method = RequestMethod.POST)
    public Message getNodesTimeDetail(@RequestBody ProjectProgressFilter filter) {
        List<ProjectProgressDataBean> list = progressService.queryProjectProgressDataBean(filter);
        return coverMessage("200", "查询进度成功", list);
    }
    /**
     * 填写进度
     * @return
     */
    @ResponseBody
    @RequestMapping(value = "/fillInProjectProgress", method = RequestMethod.GET)
    public Message fillInProjectProgress() {
        return coverMessage("200", "查询进度成功", null);
    }

}
